package com.qhx.backme.controller;


import com.qhx.backme.model.Result;
import com.qhx.backme.model.to.LoginTO;
import com.qhx.backme.model.to.RegisterTO;
import com.qhx.backme.service.OrgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api( tags = "用户功能接口")
@RestController
@RequestMapping("/finance/org")
public class OrgController {

    @Autowired
    OrgService orgService;


    @ApiOperation(value = "登录接口", notes = "登录接口")
    @RequestMapping(value = "login", method = RequestMethod.POST)
    public Result<String> login(@RequestBody LoginTO loginTO) {
        return orgService.login(loginTO);
    }

    @ApiOperation(value = "注册接口", notes = "注册接口")
    @RequestMapping(value = "register", method = RequestMethod.POST)
    public Result<String> register(@RequestBody RegisterTO registerTO) {
        return orgService.register(registerTO);
    }



}
